package cn.loioi.multi.service.impl;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.loioi.multi.common.BaseServiceImpl;
import cn.loioi.multi.mysql.been.SysLogMapper;
import cn.loioi.multi.mysql.model.SysLog;
import cn.loioi.multi.service.SysLogService;

@Service
public class SysLogServiceImpl extends BaseServiceImpl<SysLog> implements SysLogService {
	@Autowired
	private SysLogMapper sysLogMapper;

	@Override
	public int clear() {
		return sysLogMapper.clear();
	}

	@Override
	public int insert(SysLog record) {
		record.setCreateTime(new Date());
		return super.insert(record);
	}

	@Override
	public int update(SysLog record) {
		record.setUpdateTime(new Date());
		return super.update(record);
	}

	@Override
	protected SysLogMapper mapper() {
		return sysLogMapper;
	}

	@Override
	protected Class<SysLog> getGenericSuperclass() {
		return SysLog.class;
	}

}
